<?php
	include_once "submenu_db.php";
	
	class submenu_bs
	{
		//--------------Field---------------
		private $MaSubMenu = 0;
		public function SetMaSubMenu($MaSubMenu)      { $this->MaSubMenu = $MaSubMenu;       }
		public function GetMaSubMenu()                { return $this->MaSubMenu;             }
		
		private $MaMenu = 0; 
		public function SetMaMenu($MaMenu)            { $this->MaMenu = $MaMenu;             }
		public function GetMaMenu()                   { return $this->MaMenu;                }
		
		private $MaChuyenMuc = 0;
		public function SetMaChuyenMuc($MaChuyenMuc)  { $this->MaChuyenMuc = $MaChuyenMuc;   }
		public function GetMaChuyenMuc()              { return $this->MaChuyenMuc;           }
		
		private $TenSubMenu  = ""; 
		public function SetTenSubMenu($TenSubMenu)    { $this->TenSubMenu = $TenSubMenu;     }
		public function GetTenSubMenu()               { return $this->TenSubMenu;            }
		
		private $Link        = ""; 
		public function SetLink($Link)                { $this->Link = $Link;                 }
		public function GetLink()                     { return $this->Link;                  }
		
		private $Index       = 0;
		public function SetIndex($Index)              { $this->Index = $Index;               }
		public function GetIndex()                    { return $this->Index;                 }
		
		private $MoTa       = "";
		public function SetMoTa($MoTa)               { $this->MoTa = $MoTa;                 }
		public function GetMoTa()                    { return $this->MoTa;                  }
		
		private $TrangThai  = -1;
		public function SetTrangThai($TrangThai)      { $this->TrangThai = $TrangThai;       }
		public function GetTrangThai()                { return $this->TrangThai;             }
		
		private $PIN  = "";
		public function SetPIN($PIN)                  { $this->PIN = $PIN;                   }
		public function GetPIN()                      { return $this->PIN;                   }
		
		
		//--------------Method---------------
		public function Them()
		{
			$data = new submenu_db();
			return $data->Them($this->MaMenu, $this->MaChuyenMuc, $this->TenSubMenu, $this->Link, $this->Index);
		}
		
		public function CapNhat()
		{
			$data = new submenu_db();
			return $data->CapNhat($this->MaSubMenu, $this->MaMenu, $this->MaChuyenMuc, $this->TenSubMenu, $this->Link, $this->Index);
		}
		
		public function CapNhatPIN()
		{
			$data = new submenu_db();
			return $data->CapNhatPIN($this->MaSubMenu, $this->PIN);
		}
		public function CapNhatTrangThai()
		{
			$data = new submenu_db();
			return $data->CapNhatTrangThai($this->MaSubMenu, $this->TrangThai);
		}
		
		public function Xoa()
		{
			$data = new submenu_db();
			return $data->Xoa($this->MaSubMenu);
		}
		
		public function LayDanhSach()
		{
			$data = new submenu_db();
			return $data->LayDanhSach($this->MaSubMenu, $this->MaMenu, $this->MaChuyenMuc, $this->Index, $this->TrangThai);
		}
		public function MaxIndex()
		{
			$data = new submenu_db();
			return $data->MaxIndex($this->MaMenu);
		}
	}
?>